<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
	<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
	<script type="text/javascript" src="../js/selector.js"></script>
	  <link rel="stylesheet" type="text/css" href="../style/style.css">
	<title>Input Rombongan Belajar</title>
<style>
<!-- 
body {scrollbar-face-color: #0000FF; scrollbar-shadow-color: #3300FF; scrollbar-highlight-color: #3399FF; scrollbar-3dlight-color: #CCFFFF; scrollbar-darkshadow-color: #000000; scrollbar-track-color: #FFFFFF; scrollbar-arrow-color: #FFFFFF;}
}
// -->
</style>
<script type="text/javascript">
function setSelectOptions(the_form, the_select, do_check)
{
    var selectObject = document.forms[the_form].elements[the_select];
    var selectCount  = selectObject.length;

    for (var i = 0; i < selectCount; i++) {
        selectObject.options[i].selected = do_check;
    } // end for

    return true;
	the_form.submit();
} 
</script>
</head>
<body marginheight="15" marginwidth="15" bgcolor="#ECE9D8" >
	<form enctype="multipart/form-data" action="../includes/save_data.php" name="userData" id='userForm' class="zpFormWinXP" method="post" style="text-align:left">
	<table border="0" cellpadding="3" bgcolor="#FCFCFE" style="border:solid 1px #919B9C;" align="center">
	<tr>
	<td valign="top" width="100%">
	<?
	//$no=$HTTP_POST_VARS['nis'];
	include("../lib/config.php");
	?>
			<fieldset class="fieldset">
				<legend class="legend">Create Multiple User</legend>
				<table border="0" cellpadding="4" class="text3_krs">
				 <tr>
				  <td colspan="3" class="text3_krs">&nbsp;</td>
				 </tr>
				 <tr>
				  <td colspan="3">&nbsp;</td>
				 </tr>
				 <tr>
      			<TD valign="top" colspan="3">
				<table width="100%">
				<tr>
				<td>Daftar Pegawai (Keseluruhan) :<br>
	  <?
	$query=mssql_query("select nik,nama from karyawan",$conn);
	echo"<select multiple='yes' name='sel1[]' class='border_text' style=\"width:200px; height:200px; background-color: #EFEFF8;\">";
	while($row=mssql_fetch_array($query))
	{
		echo"<option value='$row[0]'>$row[0] - $row[1]</option>";
	}
	echo"</select>";
	?>
 	  			</td>
      			<td valign="middle">
	  <INPUT onClick="moveOptions(this.form.elements['sel1[]'], this.form.elements['sel2[]']);" type=button value="->" class="button"><BR>
	  <INPUT onClick="moveOptions(this.form.elements['sel2[]'], this.form.elements['sel1[]']);" type=button value="<-" class="button"> 
      			</td>
      			<td>Hasil Pemilihan Pegawai :<br>
	  <SELECT multiple="yes" size="10" name="sel2[]" style="width:200px; height:200px; background-color: #EFEFF8;" class="border_text">   	
	  </SELECT> 
		  		</td>
		  		</tr>
				</table>
				</TD>
				</tr>
				</table>
			</fieldset>
	</td>
	</tr>
</table>
<table border="0" cellpadding="3" width="" align="center">
<tr><td align="right">
		<div class="zpFormButtons">
			<input type="hidden" name="cat" value="rombel">
			<input value="Reset" name="Clear" onClick="javascript:window.location.reload()" type="reset" class="button">
			<input value="Submit" name="Submit" onClick="setSelectOptions('userData', 'sel2[]', true);" type="submit" class="button"> 
		</div>
</td></tr></table>
</form>
</body>
</html>
